<template>
  <div>
    <div class="title">
      <span class="active"><i>1</i>输入找回账号</span>
      <span><i>2</i>回答密保问题</span>
      <span><i>3</i>重置密码</span>
    </div>
    <div class="box">
      <div class="input-item">
        <label>请输入手机号：</label>
        <input type="text" v-model="phone" />
      </div>
      <button @click="next(phone, 'step2')">下一步</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      phone: "",
    };
  },
  methods: {
    // 下一步
    next(phone, value) {
      if (this.phone.length === 0) {
        return alert("手机号不能为空");
      }
      this.$emit("next", phone, value);
    },
  },
};
</script>

<style scoped>
@import url("@/assets/css/index.css");
</style>